<!-- 底部导航栏 -->
<style>
    .cart-badge {
        position: absolute;
        top: 0;
        right: 25%;
        background-color: #ff6b6b;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-item {
        position: relative;
    }
    
    .nav-item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: inherit;
    }
</style>

<div class="bottom-nav">
    <div class="nav-item {{ request()->is('wechat-service-account/index') ? 'active' : '' }}">
        <a href="{{ route('wechat.service.account.index') }}">
            <span class="nav-icon">🏠</span>
            <span>首页</span>
        </a>
    </div>
    <div class="nav-item {{ request()->is('wechat-service-account/cart') ? 'active' : '' }}">
        <a href="{{ auth('wechat')->check() ? route('wechat.service.account.cart') : route('wechat.service.account.login') }}">
            <span class="nav-icon">🛒</span>
            <span>购物车</span>
            @php
                $cartCount = app(\App\Services\CartService::class)->getCartCount();
            @endphp
            @if($cartCount > 0)
                <span class="cart-badge">{{ $cartCount }}</span>
            @endif
        </a>
    </div>
    <div class="nav-item {{ request()->is('wechat-service-account/my') ? 'active' : '' }}">
        <a href="{{ auth('wechat')->check() ? route('wechat.service.account.my') : route('wechat.service.account.login') }}">
            <span class="nav-icon">👤</span>
            <span>我的</span>
        </a>
    </div>
</div>

<!-- 欢迎弹窗组件 -->
@include('partials.welcome_modal')